<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>学生信息列表</title>
</head>
<body>
	<h2 align="center">学生信息表</h2>
	<table align="center" border="1px" cellpadding="0" cellspacing="0" width="600px">
		<tr style="margin:0 auto">
			<td>编号</td>
			<td>姓名</td>
			<td>性别</td>
			<td>出生日期</td>
			<td>编辑</td>
		</tr>
		<c:if test="${empty student }" >
			暂时没有学生信息
		</c:if>
		<c:if test="${not empty student }">
			<c:forEach var="student" items="${student }">
				<tr>
					<td>${student.id }</td>
					<td>${student.name}</td>
				    <td>${student.gender}</td>
					<td>
					<fmt:formatDate value="${student.birthday}" pattern="yyyy-MM-dd"/>
					</td>
					<td>
						<a href="${pageContext.request.contextPath }/students/${student.id}/update">修改</a>
						<a href="${pageContext.request.contextPath }/students/${student.id}/distory">删除</a>
					</td>
				</tr>
				
			</c:forEach>
		</c:if>
	</table>
	<h3 align="center"><a href="${pageContext.request.contextPath }/students/save">添加学生</a></h3>
</body>
</html>